// 判断下面的文件是否符合后缀名要求
// 合法的后缀名：.jpg  .gif  .bmp .webp  .png

var filename = 'd://files/mymap/3.jpg';


var correctName = [".jpg", ".gif", ".bmp", ".webp", ".png"]

var index = filename.lastIndexOf('.')
var name = filename.substring(index)

console.log(correctName.includes(name));
